Skip to content

Validate and simplify OpenDJ guides - #1313

Merged
vharseko merged 4 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/validate-asciidoc-guides
Nov 20, 2026
Merged

vharseko merged 4 commits into
OpenIdentityPlatform:masterfrom
vharseko:docs/validate-asciidoc-guides

Conversation

@vharseko

@vharseko vharseko commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Validate and simplify the AsciiDoc Getting Started, Installation, Administration, and Server Developer guides against the OpenDJ tools and code.
  • Add hands-on examples for LDAP SDK clients, REST over HTTPS, access delegation, replication, and LDAP performance measurements.
  • Correct upgrade, backend migration, plugin packaging, certificate verification, and monitoring instructions.

Review follow-up

  • After an interrupted Docker upgrade, identify all affected DN equality indexes using the backend configuration and effective instance schema, including inherited matching rules. Require a valid index status and successful offline verification for every affected index before clearing .upgrade-pending. Align the Docker README and upgrade startup message with the recovery guide, including when to restore the backup.
  • Explain when Docker retries bootstrap and how to recover running and stopped containers. Mount a named data volume in the Docker README examples. Document how to copy an instance from a stopped container's writable layer into a volume. If OpenDJ starts in the recovery shell, require a successful local stop before clearing .bootstrap-pending.
  • In the ZIP upgrade example, use stop-ds --noPropertiesFile and require a successful local stop, backup, and extraction before replacing files.
  • Require a restart when changing the listen address of an active JMX handler and use jmx-read in the monitoring example.
  • Specify the DSML and REST to LDAP WAR context paths. For Tomcat with unpackWARs=false, deploy the exploded REST gateway directory and keep the archive outside appBase. Identify the SASL sample's test-only TLS settings and document _id for users (uid) and groups (cn).

Verification

  • The documentation module passed mvn verify with the man-pages profile, including 36 tests, the AsciiDoc attribute check, and 644 file cross-references across 77 pages.
  • On OpenDJ 5.2.0, exercised stopped-container recovery with its existing volume and with data copied from the writable layer. Verified that stop-ds --noPropertiesFile shut down the server in the recovery shell before the repaired volume was attached to a replacement container. Checked index validity and offline verification before and after rebuilding the owner and inherited myManager DN equality indexes.
  • Exercised the ZIP failure paths and confirmed that the successful backup archived the installation and instance data with restricted permissions.
  • On Tomcat 10.1.59 with unpackWARs=false, confirmed that Tomcat selects the WAR when both artifacts are present and that deploying the exploded directory alone exposes config.json as a file on disk.
  • In the initial pass, checked 1,007 local links across 47 rendered pages. Exercised the HTTPS REST and password delegation recipes with OpenDJ 5.2.0 and 5.2.1-SNAPSHOT ZIP distributions.
  • Verified both directions of the replication exercise and packaged resources in both plugin examples.

@vharseko vharseko added the docs label Nov 18, 2026
@vharseko
vharseko marked this pull request as ready for review November 19, 2026 04:58
@vharseko
vharseko requested a review from maximthomas November 19, 2026 04:58

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The REST walkthrough uses curl --cacert to verify the local HTTPS listener certificate.


issue (blocking): Verify every affected base DN before clearing .upgrade-pending.

chap-upgrade.adoc:283

Upgrade writes buildinfo before running post-upgrade tasks, and UpgradeTasks checks and logs each base DN in turn. If the container stops mid-run, later base DNs can be absent from upgrade.log. Rebuilding only the listed indexes and clearing the marker can make the container report healthy while indexed searches still miss entries in other suffixes. Explain how to verify all remaining base DNs and rebuild their indexes as needed before clearing the marker, or restore the backup. Upgrade task order Base DN verification loop Marker check


issue (blocking): Restart the server when moving an active JMX listener to loopback.

chap-monitoring.adoc:122

JmxConnectionHandler keeps its previous listen address when the configuration changes. If JMX was listening on all interfaces, it continues to do so until restart even though the configuration now specifies 127.0.0.1. Add a restart step for an already enabled handler, as in the JMX connection handler procedure. JMX configuration change handling JMX restart instructions


issue (non-blocking): Set the WAR context path before testing the gateways.

chap-install.adoc:861

Tomcat auto-deployment derives the context path from the WAR filename. Deploying the DSML WAR under its published name leaves the example request to /dsml/DSMLServlet returning 404 unless /dsml is configured separately. The REST to LDAP example similarly assumes /rest2ldap. Show how to set the context paths, for example by renaming the WAR files before deployment. REST to LDAP deployment example Tomcat context naming


issue (non-blocking): Label SASLAuth.java as a local test example.

chap-ldap-sdk.adoc:96

The SDK 5.2.0 sample enables StartTLS with TrustManagers.trustAll() and then sends the password using SASL PLAIN. Copying the full setup into an application sends credentials without verifying the server certificate or identity. Point readers to SASLAuth.java for constructing the bind request and to SimpleAuth.java for configuring certificate and hostname verification. SASLAuth TLS setup SimpleAuth certificate and hostname verification


issue (non-blocking): Require a successful backup before replacing files during a ZIP upgrade.

chap-upgrade.adoc:146

The example uses plain newlines between the backup, file copy, and upgrade commands. Bash continues after a nonzero tar exit by default, so a full disk can leave the operator upgrading with an incomplete backup. Require the stop, backup, and extraction steps to succeed before replacing files, either by chaining them with && or by adding an explicit checkpoint. A Bash check with stubbed commands confirmed that the current sequence continues after tar fails.


issue (non-blocking): Clarify when Docker retries bootstrap after a setup failure.

chap-install.adoc:545

run.sh opens an existing server for recovery if the volume already contains data/config. After an earlier failure, the next start retries bootstrap. Document both cases so operators apply manual recovery and remove .bootstrap-pending only for a partially configured instance. Startup with an existing configuration Bootstrap path


issue (non-blocking): Remove monitor-read from the JMX setup example.

chap-monitoring.adoc:127

OpenDJ ignores the unknown monitor-read value when computing user privileges. The JMX authenticator checks jmx-read, and LDAP access to cn=monitor is governed by ACIs. Keep jmx-read in the prose and the LDIF. User privilege handling JMX privilege check


issue (non-blocking): Document that group _id values come from the LDAP cn attribute.

chap-rest-operations.adoc:853

The built-in example-v1.json sets dnAttribute: uid for /api/users and dnAttribute: cn for /api/groups. The new summary attributes uid to the entire mapping, which can lead clients to construct incorrect group URLs. Scope the uid rule to user collections and give the cn rule for groups. User mapping Group mapping

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I addressed all eight points in c5d133c36c.

  • The Docker recovery instructions explain how to identify affected base DNs from the configuration and verify or rebuild their indexes offline. They direct operators to clear .upgrade-pending only after all outstanding tasks are complete. The guide, Docker README, and startup message also explain when to restore the backup.
  • The JMX walkthrough requires a restart when changing the address of an active handler and grants only jmx-read in the example.
  • The ZIP example stops at the first failed command, and the Docker installation guide explains when startup retries bootstrap and when it opens the instance for manual recovery.
  • The gateway instructions set both WAR context paths. The SDK guide points to SASLAuth.java for the bind request and SimpleAuth.java for certificate and hostname verification. The REST guide specifies uid for user IDs and cn for group IDs.

The follow-up passed 36 documentation tests, the AsciiDoc attribute check, and 643 file cross-reference checks. I also verified the offline index commands in the OpenDJ 5.2.0 Docker image and exercised the ZIP failure paths.

@vharseko
vharseko requested a review from maximthomas November 19, 2026 17:34

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The ZIP example stops before replacing files when shutdown, backup, or extraction fails.


issue (blocking): Use the instance schema to identify every affected DN equality index.

chap-upgrade.adoc:287

config.ldif lists equality indexes, but the attribute's effective matching rule comes from the instance schema. For example, the upgrade's myManager test uses an attribute that inherits its rule from distinguishedName. If the upgrade stops before logging that suffix, an operator can miss the custom index, clear .upgrade-pending, and bring the server back with stale equality keys. Document how to match each enabled backend's equality indexes against distinguishedNameMatch or uniqueMemberMatch in the effective schema, including inherited rules. Upgrade index selection Custom-schema test


issue (blocking): Require a valid index before clearing .upgrade-pending.

chap-upgrade.adoc:299

An interrupted rebuild can leave an index empty and marked untrusted. In a populated 5.2.0 backend, verify-index --countErrors exited 0 for a degraded owner index while backendstat show-index-status showed Index Valid=false. Clearing the marker after that result can return the container to service while equality searches that fall back to an unindexed scan fail for ordinary clients. Require checking index status, rebuilding affected degraded indexes, then rechecking validity and verification before clearing the marker. Rebuild trust transitions Index status Unindexed-search privilege check


suggestion (non-blocking): Track a separate verify-index issue for checks on degraded indexes.

VerifyJob.java:930

Named verification accepts an untrusted index, and missing keys can be counted as entry-limit statistics rather than errors. This behavior predates the guide changes and also affects calls outside Docker. Report degraded indexes as unverified and preserve legitimate entry-limit overflow behavior, with coverage for both cases and for the upgrade caller's interpretation of the result. Index read Upgrade caller


issue (non-blocking): Cover bootstrap recovery when the container exits.

chap-install.adoc:545

Setup can create data/config before writing a usable config.ldif. Startup then takes the recovery branch, and the 5.2.0 foreground server exits when config.ldif is missing. A stopped container cannot run the guide's docker exec command. In the installation guide and Docker README, condition docker exec on the container staying up and point readers with a stopped container to a temporary shell from the same image with the existing volume mounted. Setup copies the template Recovery branch Docker exec reference


suggestion (non-blocking): Pin the ZIP example's stop command to the local instance.

chap-upgrade.adoc:146

The bare stop-ds invocation predates the && chain. In OpenDJ 5.1.2, a tools.properties profile that supplies connection options selects the protocol shutdown path, which may target a different server and allow the local backup to proceed while the intended instance is still running. Add --noPropertiesFile to the local UNIX example. The 5.1.2 stoppability check selected the protocol path with the profile and the local path with the flag. Property argument handling Stop mode selection


suggestion (non-blocking): Document the standalone REST gateway's exploded deployment requirement.

chap-install.adoc:752

The rest2ldap.war naming example works with Tomcat's default unpackWARs=true. On a host configured to keep WARs packed, the gateway uses new File(configUrl.toURI()) for /config.json and fails when that URL has a non-file scheme. Track the existing deployment requirement separately and document using an exploded WAR on such hosts. Gateway configuration loading Tomcat Host configuration

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I updated the guides in 1258102725.

  • Docker upgrade recovery now identifies DN equality indexes for every affected base DN using the effective instance schema, including rules inherited through SUP. It requires both a valid index status and successful offline verification before clearing .upgrade-pending, and repeats both checks after a rebuild.
  • The installation guide and Docker README now cover bootstrap recovery with a temporary shell from the same image and the existing volume when the original container has exited.
  • The ZIP example uses stop-ds --noPropertiesFile for the local instance. The REST gateway instructions cover exploded deployment when Tomcat keeps WARs packed.
  • I drafted a separate issue for verify-index covering untrusted index reporting, ordinary entry-limit overflow, and the upgrade caller's recovery decision.

The documentation build passed 36 tests, the AsciiDoc attribute check, and 643 cross-reference checks. On OpenDJ 5.2.0 I exercised recovery with the original Docker volume and verified the owner and inherited myManager index checks before and after an offline rebuild. I also checked the ZIP failure paths and the packed and exploded WAR behavior on Tomcat 10.1.59.

@vharseko
vharseko requested a review from maximthomas November 20, 2026 09:35

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The upgrade procedure now checks index trust and contents for every affected base DN and repeats both checks after a rebuild.


issue (blocking): Make stopped-container recovery operate on the original instance.

README.md:79

The README's startup examples leave /opt/opendj/data in the container's writable layer. --volumes-from shares mounted storage, so the helper sees a fresh instance directory and changes made there never reach the original container. A Docker fixture confirmed that the helper could see the pending marker only with an instance mount. Mount a named volume in the startup examples, state the mount prerequisite before opening the helper, and point operators with existing mountless instances to the data-copy procedure. README startup examples Docker volume sharing Copying an unmounted instance


issue (non-blocking): Keep the packed WAR out of webapps when deploying the exploded gateway.

chap-install.adoc:769

The preceding automatic deployment step tells readers to copy rest2ldap.war into webapps. With unpackWARs=false, Tomcat gives the WAR priority over the same-named directory, so the gateway still receives a non-file URL for config.json and fails to initialize. Make the two deployment paths explicit and tell readers using the exploded path to keep the WAR outside webapps. Tomcat automatic deployment Gateway configuration loader


issue (non-blocking): Stop the server cleanly before exiting the bootstrap recovery shell.

chap-install.adoc:560

CLI setup starts OpenDJ in the background by default. If the operator starts it while completing setup, exiting the helper shell terminates the container and kills the JVM before it can shut down cleanly. If OpenDJ was started in the helper, require a successful local ./bin/stop-ds --noPropertiesFile before clearing .bootstrap-pending and exiting. Apply the same step in the Docker README. CLI setup default Normal Docker bootstrap shutdown Linux PID namespaces Docker README recovery step


suggestion (non-blocking): Track extensible-only DN indexes in a separate upgrade issue.

UpgradeUtils.java:357

An extensible index configured with distinguishedNameMatch or uniqueMemberMatch uses the same DN-normalized index keys as an equality index. The existing upgrade task selects only configurations with ds-cfg-index-type: equality, so an index configured only as extensible can retain stale keys even after a successful upgrade. Extend selection to those explicitly configured matching rules and document manual verification for releases affected by the gap. Index configuration and rule lookup Exact-match physical index selection DN upgrade advisory

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I updated the Docker and REST gateway instructions in cdfdd57.

  • The Docker README startup examples mount a named data volume. The stopped-container recovery procedure explains when to share the original mount and how to copy an instance from the writable layer into a new volume for a replacement container.
  • If OpenDJ starts in the recovery shell, both guides require a successful local ./bin/stop-ds --noPropertiesFile before clearing .bootstrap-pending and exiting.
  • The Tomcat instructions keep the WAR outside appBase when deploying the exploded gateway with unpackWARs=false.

The documentation build passed 36 tests, the AsciiDoc attribute check, and 644 cross-reference checks. I exercised the copy-and-replace recovery on OpenDJ 5.2.0 and verified the WAR and directory deployment behavior on Tomcat 10.1.59. The extensible DN-index gap belongs in a separate upgrade issue.

@vharseko
vharseko requested a review from maximthomas November 20, 2026 12:06

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The Docker instructions preserve the original instance in both recovery paths and require a clean local shutdown before clearing the bootstrap marker.

@vharseko
vharseko merged commit fac7c60 into OpenIdentityPlatform:master Nov 20, 2026
14 of 15 checks passed
@vharseko
vharseko deleted the docs/validate-asciidoc-guides branch November 20, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants